lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 27));
lblNewLabel.setBounds(23, 41, 536, 33);
contentPane.add(lblNewLabel);
- if (bookings.isEmpty())
- lblNewLabel
- .setText("There are not bookings to be confirmed or denied");
- else
- lblNewLabel.setText("List of bookings:");
JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(new Rectangle(45, 305, 320, 116));
scrollPane.setBounds(23, 113, 536, 271);
}
((DefaultTableModel) table.getModel()).removeRow(table
.getSelectedRow());
+ bookings.remove(book);
}
}
});
-
- if (this.bookings.get(0).getOffer().isBooked()) {
- btnDenyAddition.setEnabled(false);
- btnNewButton.setEnabled(false);
+ if (bookings.isEmpty())
+ lblNewLabel
+ .setText("There are not bookings to be confirmed or denied");
+ else {
+ lblNewLabel.setText("List of bookings:");
+ if (this.bookings.get(0).getOffer().isBooked()) {
+ btnDenyAddition.setEnabled(false);
+ btnNewButton.setEnabled(false);
+ }
}
-
+
btnDenyAddition.setBounds(390, 395, 169, 25);
contentPane.add(btnDenyAddition);